unit uShowUrgeRecord;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
  dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
  dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
  dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
  dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins,
  dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
  dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
  dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinPumpkin, dxSkinSeven,
  dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
  dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
  dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
  dxSkinXmas2008Blue, dxSkinscxPCPainter, cxPCdxBarPopupMenu, cxStyles,
  cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit, cxNavigator, Data.DB,
  cxDBData, cxImageComboBox, cxGridLevel, cxGridCustomTableView,
  cxGridTableView, cxGridDBTableView, cxClasses, cxGridCustomView, cxGrid, cxPC,
  Datasnap.DBClient, ClientRowSet;

type
  TFrmShowUrgeRecord = class(TForm)
    crsUrge: TClientRowSet;
    dsUrgeFetch: TDataSource;
    crsUrgeID: TStringField;
    crsUrgeCONNECT_ID: TStringField;
    crsUrgePREDICT_DEAL_TIME: TStringField;
    crsUrgeCRT_DT: TStringField;
    crsUrgeUPD_DT: TStringField;
    crsUrgeVERSION: TFloatField;
    crsUrgeCHANNEL_ID: TStringField;
    crsUrgeREMARK: TStringField;
    crsUrgeSTATUS: TSmallintField;
    crsUrgeTYPE: TSmallintField;
    crsUrgeEMP_NO: TStringField;
    GrdUrge: TcxGrid;
    tvUrge: TcxGridDBTableView;
    lvEXP_COMP: TcxGridLevel;
    tvUrgePREDICT_DEAL_TIME: TcxGridDBColumn;
    tvUrgeCRT_DT: TcxGridDBColumn;
    tvUrgeUPD_DT: TcxGridDBColumn;
    tvUrgeREMARK: TcxGridDBColumn;
    tvUrgeSTATUS: TcxGridDBColumn;
    crsUrgeCRT_BY: TStringField;
    crsUrgeNOTICE_TAG: TSmallintField;
    crsUrgeAGING_TYPE: TSmallintField;
    crsUrgeURGE_LONG: TFloatField;
    tvUrgeURGE_LONG: TcxGridDBColumn;
    tvUrgeCRT_BY: TcxGridDBColumn;
    tvUrgeAGING_TYPE: TcxGridDBColumn;
    tvUrgeNOTICE_TAG: TcxGridDBColumn;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FrmShowUrgeRecord: TFrmShowUrgeRecord;
  procedure FrmShowUrgeRecordShow(ID:string);
implementation

{$R *.dfm}

uses ucommFunction, Console;

procedure FrmShowUrgeRecordShow(ID:string);
begin
  Application.CreateForm(TFrmShowUrgeRecord,FrmShowUrgeRecord);
  with FrmShowUrgeRecord do
  begin
    crsUrge.Close;
    crsUrge.CommandText:='select '+GetClientRowSetColumns(crsUrge)+' from tsp_urge where CONNECT_ID='+QuotedStr(ID);
    crsUrge.Open;
    ShowModal;
  end;
  FreeAndNil(FrmShowUrgeRecord);
end;

procedure TFrmShowUrgeRecord.FormCreate(Sender: TObject);
begin
  pSetCaption(Self);
end;

end.
